package question1;

import java.text.DecimalFormat;

/**
 * extrait de http://www.oreilly.com/catalog/hfdesignpat/
 */
public abstract class Beverage
{
  String description= "Unknown Beverage";

  public String getDescription()
  {
    return description;
  }

  public abstract double cost();

  public String toString(){
	  DecimalFormat f = new DecimalFormat();
	  f.setMaximumFractionDigits(2);
	  return this.getDescription() + " $" + f.format(this.cost());
  }
}
